function _standard(form) {
	if (form.type.value == 2) {
		return form.v_l.value + "x" + form.v_w.value + "x" + form.v_h1.value;
	}

	if (form.type.value == 3) {
		return form.v_d.value + "x" + form.v_h2.value;
	}

	if (form.type.value == 9) {
		return form.standard.value;
	}

	return form.standard.value;
}

function _type(type) {
	if (type == 2) {
		$("#name").attr("disabled", false);
		$("#standard").attr("disabled", false);
		
		$("#label_cube").show();
		$("#label_cylinder").hide();
		$("#label_standard").hide();
		$("#label_v").show();
		
		$("#label_unit").show();

		return false;
	}

	if (type == 3) {
		$("#name").attr("disabled", false);
		$("#standard").attr("disabled", false);
		
		$("#label_cube").hide();
		$("#label_cylinder").show();
		$("#label_standard").hide();
		$("#label_v").show();
		
		$("#label_unit").show();

		return false;
	}

	if (type == 9) {
		$("#name").attr("disabled", false);
		$("#standard").attr("disabled", false);
		
		$("#label_cube").hide();
		$("#label_cylinder").hide();
		$("#label_standard").show();
		$("#label_v").hide();

		$("#label_unit").show();

		return false;
	}
	
	$("#name").attr("disabled", true);
	$("#standard").attr("disabled", true);

	$("#label_cube").hide();
	$("#label_cylinder").hide();
	$("#label_standard").show();
	$("#label_v").hide();
	$("#label_unit").hide();

	return true;
}

function _v() {
	var type = $("#type").val();
	if (type == 2) {
		return _v_2();
	}

	if (type == 3) {
		return _v_3();
	}

	return '';
}

function _v_2() {
	var v_l = $("#v_l").val();
	if (v_l == null || v_l == '') {
		return '';
	}

	var v_w = $("#v_w").val();
	if (v_w == null || v_w == '') {
		return '';
	}

	var v_h1 = $("#v_h1").val();
	if (v_h1 == null || v_h1 == '') {
		return '';
	}

	var r = eval(v_l) * eval(v_w) * eval(v_h1) * Math.pow(10, -3);

	return fmoney(r, 3);
}

function _v_3() {
	var v_d = $("#v_d").val();
	if (v_d == null || v_d == '') {
		return '';
	}

	var b = eval(v_d) / 2;

	var v_h2 = $("#v_h2").val();
	if (v_h2 == null || v_h2 == '') {
		return '';
	}

	var r = Math.PI * Math.pow(b, 2) * eval(v_h2) * Math.pow(10, -3);

	return fmoney(r, 3);
}